// logs.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    navStatusBarHeight: 0
  },
  onLoad() {
    // 获取手机系统信息
    let systemInfo = wx.getSystemInfoSync();

    // 屏幕顶部状态栏高度
    let statusBarHeight = Number(systemInfo.statusBarHeight);

    // 获取胶囊区信息
    let menu = wx.getMenuButtonBoundingClientRect();

    // 屏幕顶部状态栏加导航栏高度
    let navStatusBarHeight = statusBarHeight + menu.height + (menu.top - statusBarHeight) * 2;
    
    this.setData({
        navStatusBarHeight: navStatusBarHeight
    })
  },
})